{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "efd60251-5052-42e9-a933-a117e19cf142",
   "metadata": {},
   "source": [
    "# Geographic Polygon Plot\n",
    "\n",
    "A US geographic thematical map where states are colored by their [U.S. Bureau of Economic Analysis (BEA) region](https://www.icip.iastate.edu/maps/refmaps/bea). This example uses `polygons` to display geographic shapes with categorical color mapping."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1b808b8d-c29f-4fac-9bc1-bb3d3dc78e16",
   "metadata": {},
   "outputs": [],
   "source": [
    "import hvplot.pandas  # noqa\n",
    "\n",
    "gdf = hvplot.sampledata.us_states(\"geopandas\")\n",
    "\n",
    "gdf.hvplot.polygons(\n",
    "    geo=True,\n",
    "    color='bea_region',\n",
    "    hover_cols=['state', 'pop_density', 'income_range'],\n",
    "    hover_tooltips=[\n",
    "        (\"State\", \"@state\"),\n",
    "        (\"Pop. density\", \"@pop_density /mi2\"),\n",
    "        (\"Median income range\", \"@income_range\")\n",
    "    ],\n",
    "    title='US states colored by BEA region (Bokeh)',\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "18c91492-9f5c-4114-98ee-29a405812277",
   "metadata": {},
   "source": [
    ":::{seealso}\n",
    "- [Polygons reference documentation](../../ref/api/manual/hvplot.hvPlot.polygons.ipynb)\n",
    "- [Geographic Options page](../../ref/plotting_options/geographic.ipynb)\n",
    ":::"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
